//
//  XQBaiduMapVC.m
//  XQBaiduMapDemo
//
//  Created by WXQ on 2019/8/6.
//  Copyright © 2019 WXQ. All rights reserved.
//

#import "XQBaiduMapVC.h"

#import <BaiduMapAPI_Base/BMKBaseComponent.h>//引入base相关所有的头文件
#import <BaiduMapAPI_Map/BMKMapComponent.h>//引入地图功能所有的头文件

@interface XQBaiduMapVC () <BMKMapViewDelegate>

@property (nonatomic, strong) BMKMapView *mapView;

@end

@implementation XQBaiduMapVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.mapView = [[BMKMapView alloc] initWithFrame:self.view.bounds];
    self.mapView.delegate = self;
    self.mapView.overlookEnabled = NO;
    self.mapView.showsUserLocation = YES;
    [self.view addSubview:self.mapView];
    
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
//    self.mapView.frame = self.view.bounds;
    
    [self.mapView viewWillAppear];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.mapView viewWillDisappear];
}

- (void)dealloc {
    NSLog(@"%s", __func__);
    self.mapView.delegate = nil;
}

@end

















